package com.itheima.day09;

import java.util.Scanner;

public class Test5 {
    /*
     需求：以字符串的形式从键盘接受一个手机号，将中间四位号码屏蔽
     */
    public static void main(String[] args) {
        //1.键盘录入手机号码
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号码:");
        String telString = sc.next();

        //2.截取号码前三个数
        String start = telString.substring(0,3);
        //3.截取号码后四位
        String end = telString.substring(telString.length() - 4);
        //4.输出打印
        System.out.println(start + "****" + end);
    }
}
